package com.liuxin.zhiyuan.shujuzhongxin.controller;

import java.util.Arrays;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.liuxin.zhiyuan.shujuzhongxin.domain.po.HistoricalAdmissionScoreEntity;
import com.liuxin.zhiyuan.shujuzhongxin.service.HistoricalAdmissionScoreService;
import com.liuxin.common.utils.PageUtils;
import com.liuxin.common.utils.R;



/**
 * 院校专业招生信息表
 *
 * @author zsl
 * @email 1301966496@qq.com
 * @date 2025-11-08 22:16:26
 */
@RestController
@RequestMapping("shujuzhongxin/historicaladmissionscore")
public class HistoricalAdmissionScoreController {
    @Autowired
    private HistoricalAdmissionScoreService historicalAdmissionScoreService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    //@RequiresPermissions("shujuzhongxin:historicaladmissionscore:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = historicalAdmissionScoreService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info")
    //@RequiresPermissions("shujuzhongxin:historicaladmissionscore:info")
    public R info(@RequestParam("id") Integer id){
		HistoricalAdmissionScoreEntity historicalAdmissionScore = historicalAdmissionScoreService.getById(id);

        return R.ok().put("historicalAdmissionScore", historicalAdmissionScore);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    //@RequiresPermissions("shujuzhongxin:historicaladmissionscore:save")
    public R save(@RequestBody HistoricalAdmissionScoreEntity historicalAdmissionScore){
		historicalAdmissionScoreService.save(historicalAdmissionScore);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
   //@RequiresPermissions("shujuzhongxin:historicaladmissionscore:update")
    public R update(@RequestBody HistoricalAdmissionScoreEntity historicalAdmissionScore){
		historicalAdmissionScoreService.updateById(historicalAdmissionScore);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    //@RequiresPermissions("shujuzhongxin:historicaladmissionscore:delete")
    public R delete(@RequestBody Integer[] ids){
		historicalAdmissionScoreService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
